package test1231.test1;

public class MemberB extends MemberFather {
    int time;
    int money;
    public MemberB() {
    }

    public MemberB(String name, int time, int money) {
        super(name);
        this.time = time;
        this.money = money;
    }


    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    @Override
    public String toString() {
        return "MemberB{" +
                "name='" + super.getName() + '\'' +
                ", time=" + time +
                ", money=" + money +
                '}';
    }
    @Override
    public double allmoney() {
        return time * money;
    }
}
